<template>
	<el-container>
		<el-header style="height: auto;" >
			<el-card style="width: 100%; height: auto;" shadow="hover">
				<!--				<template #header>
									<div class="card-header" >
										<span>查询区域</span>
									</div>
								</template>-->
				<div>
					<Search :onSearch="searchHandler"/>
				</div>
			</el-card>
		</el-header>
		<el-header>
			<div class="left-panel">
				<el-button type="primary" icon="el-icon-plus" ></el-button>
				<el-button type="primary" plain >分配角色</el-button>
				<el-button type="primary" plain >密码重置</el-button>
			</div>
			<div class="right-panel">
				<el-button  type="primary" plain icon="el-icon-share" circle />
				<el-button  type="primary" plain icon="sc-icon-file-excel" circle ></el-button>
				<el-button  type="primary" plain icon="el-icon-Delete" circle />
			</div>
		</el-header>
		<el-main class="nopadding">
			<sc-Table
				ref="table"
				:stripe="true"
				:hidePagination="false"
				:hideDo="false"
				:params="params"
				stripe
				remoteSort
				remoteFilter
				row-key="id"
				:data="tableData"
				:column="tableColumns">
				<el-table-column
					type="index"
					label="序号"
					width="80"
					align="center"
				/>
			</sc-Table>
		</el-main>
	</el-container>
</template>

<script setup>
import { ref, getCurrentInstance  } from 'vue'
import data from './data.json'
import columns from './columns.json'
import Search from './search2';
const { proxy: { $API } } = getCurrentInstance()
// 表格数据
const tableData = ref(data)
// 表格列配置
const tableColumns = ref(columns)

const apiObj = ref($API.simple.list)

const params = ref({});

const searchParams = ref({});

const searchHandler = (params) => {
	console.log(params);
}


</script>

<style>

</style>
